package com.example.bourse.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 用户消息表
 * @TableName user_messages
 */
@TableName(value ="user_messages")
@Data
public class UserMessages implements Serializable {
    /**
     * 消息ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 发送者用户ID
     */
    @TableField(value = "sender_id")
    private Long senderId;

    /**
     * 接收者用户ID
     */
    @TableField(value = "receiver_id")
    private Long receiverId;

    /**
     * 消息内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 发送时间
     */
    @TableField(value = "send_time")
    private Date sendTime;

    /**
     * 阅读时间
     */
    @TableField(value = "read_time")
    private Date readTime;

    /**
     * 发送者是否删除: 0=否、1=是
     */
    @TableField(value = "sender_deleted")
    private Integer senderDeleted;

    /**
     * 接收者是否删除: 0=否、1=是
     */
    @TableField(value = "receiver_deleted")
    private Integer receiverDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}